#include "bmp.h"
#include "lcd.h"
    char data0[]={/*--  文字:  0  --*/
/*--  宋体18;  此字体下对应的点阵为：宽x高=12x24   --*/
/*--  宽度不是8的倍数，现调整为：宽度x高度=16x24  --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x80,0x3F,0xC0,0x39,0xC0,
0x70,0xE0,0x70,0xE0,0x70,0xE0,0xF0,0xE0,0xF0,0xE0,0xF0,0xE0,0xF0,0xE0,0x70,0xE0,
0x70,0xE0,0x70,0xE0,0x39,0xC0,0x3F,0xC0,0x1F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,};
    char data1[]={
/*--  文字:  1  --*/
/*--  宋体18;  此字体下对应的点阵为：宽x高=12x24   --*/
/*--  宽度不是8的倍数，现调整为：宽度x高度=16x24  --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x3F,0x00,0x3F,0x00,
0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x07,0x00,
0x07,0x00,0x07,0x00,0x07,0x00,0x0F,0x00,0x3F,0xC0,0x00,0x00,0x00,0x00,0x00,0x00, };

    char data2[]={
/*--  文字:  2  --*/
/*--  宋体18;  此字体下对应的点阵为：宽x高=12x24   --*/
/*--  宽度不是8的倍数，现调整为：宽度x高度=16x24  --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x80,0x3B,0xC0,0x70,0xE0,
0x70,0xE0,0x70,0xE0,0x30,0xE0,0x01,0xC0,0x01,0xC0,0x03,0x80,0x07,0x00,0x0E,0x00,
0x1C,0x00,0x38,0x60,0x70,0x60,0x7F,0xE0,0xFF,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,
       };
    char data3[]={
/*--  文字:  3  --*/
/*--  宋体18;  此字体下对应的点阵为：宽x高=12x24   --*/
/*--  宽度不是8的倍数，现调整为：宽度x高度=16x24  --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x80,0x3B,0xC0,0x71,0xC0,
0x71,0xE0,0x31,0xE0,0x01,0xC0,0x03,0x80,0x0F,0x80,0x03,0xC0,0x00,0xE0,0x00,0xE0,
0x30,0xE0,0x70,0xE0,0x70,0xE0,0x7B,0xC0,0x3F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
          };
     char data4[]={

/*--  文字:  4  --*/
/*--  宋体18;  此字体下对应的点阵为：宽x高=12x24   --*/
/*--  宽度不是8的倍数，现调整为：宽度x高度=16x24  --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x03,0x80,0x07,0x80,
0x07,0x80,0x0F,0x80,0x1F,0x80,0x1B,0x80,0x33,0x80,0x73,0x80,0xE3,0x80,0xFF,0xF0,
0x03,0x80,0x03,0x80,0x03,0x80,0x03,0xC0,0x0F,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,

             };
         char data5[]={
/*--  文字:  5  --*/
/*--  宋体18;  此字体下对应的点阵为：宽x高=12x24   --*/
/*--  宽度不是8的倍数，现调整为：宽度x高度=16x24  --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xE0,0x3F,0xE0,0x30,0x00,
0x30,0x00,0x30,0x00,0x30,0x00,0x7F,0x80,0x79,0xC0,0x30,0xE0,0x00,0xE0,0x00,0xE0,
0x70,0xE0,0x70,0xE0,0x70,0xE0,0x7B,0xC0,0x3F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
    };
        char data6[]={
/*--  文字:  6  --*/
/*--  宋体18;  此字体下对应的点阵为：宽x高=12x24   --*/
/*--  宽度不是8的倍数，现调整为：宽度x高度=16x24  --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xC0,0x1D,0xE0,0x39,0xE0,
0x70,0xC0,0x70,0x00,0x70,0x00,0xFF,0xC0,0xFD,0xE0,0xF0,0xE0,0xF0,0xE0,0xF0,0xE0,
0x70,0xE0,0x70,0xE0,0x78,0xE0,0x3D,0xC0,0x1F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,

    };
          char data7[]={
/*--  文字:  7  --*/
/*--  宋体18;  此字体下对应的点阵为：宽x高=12x24   --*/
/*--  宽度不是8的倍数，现调整为：宽度x高度=16x24  --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xE0,0x7F,0xE0,0x60,0xC0,
0x61,0xC0,0x01,0x80,0x03,0x80,0x03,0x00,0x07,0x00,0x07,0x00,0x0E,0x00,0x0E,0x00,
0x0E,0x00,0x0E,0x00,0x1E,0x00,0x1E,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

    };
          char data8[]={
/*--  文字:  8  --*/
/*--  宋体18;  此字体下对应的点阵为：宽x高=12x24   --*/
/*--  宽度不是8的倍数，现调整为：宽度x高度=16x24  --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x39,0xC0,0x70,0xE0,
0x70,0xE0,0x70,0xE0,0x78,0xE0,0x3D,0xC0,0x1F,0x80,0x3F,0xC0,0x71,0xE0,0x60,0xE0,
0xE0,0xE0,0xE0,0xE0,0x70,0xE0,0x79,0xC0,0x3F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,

    };
          char data9[]={
/*--  文字:  9  --*/
/*--  宋体18;  此字体下对应的点阵为：宽x高=12x24   --*/
/*--  宽度不是8的倍数，现调整为：宽度x高度=16x24  --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x3B,0xC0,0x70,0xE0,
0x70,0xE0,0xE0,0xE0,0xE0,0xE0,0xF0,0xE0,0x71,0xE0,0x7B,0xE0,0x3F,0xE0,0x00,0xE0,
0x00,0xE0,0x31,0xC0,0x79,0xC0,0x7B,0x80,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    };

  //data的指针数组
    char *dat[]={data0,data1,data2,data3,data4,data5,data6,data7,data8,data9};

    char lightword1[]={/*--  文字:  光  --*/
/*--  宋体18;  此字体下对应的点阵为：宽x高=24x24   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x00,0x00,0x1C,0x00,0x0E,0x18,0xE0,0x07,
0x18,0xF0,0x03,0x98,0xE0,0x03,0xD9,0xC0,0x01,0xD9,0x80,0x01,0x9B,0x1C,0x7F,0xFF,
0xFE,0x20,0xE6,0x00,0x00,0xC6,0x00,0x00,0xC6,0x00,0x01,0xC6,0x00,0x01,0xC6,0x00,
0x01,0xC6,0x0C,0x03,0x86,0x0C,0x03,0x86,0x0C,0x07,0x06,0x0E,0x0E,0x07,0xFF,0x3C,
0x07,0xFE,0x70,0x00,0x00,0x00,0x00,0x00,
};
 char lightword2[]={/*--  文字:  照  --*/
/*--  宋体18;  此字体下对应的点阵为：宽x高=24x24   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x31,0xBF,0xFC,0x3F,0xD7,0x18,0x39,0xC7,0x38,0x39,
0xCE,0x38,0x39,0xCF,0xB8,0x39,0xDC,0xF0,0x3F,0xD8,0x70,0x39,0xF0,0x18,0x39,0xFF,
0xFC,0x39,0xDC,0x38,0x39,0xDC,0x38,0x39,0xDC,0x38,0x3F,0xDF,0xF8,0x39,0xDC,0x38,
0x39,0x80,0x00,0x09,0x8C,0x20,0x19,0xC6,0x38,0x18,0xE7,0x1C,0x38,0xE7,0x9E,0x78,
0xE3,0x8E,0x70,0xC3,0x0C,0x00,0x00,0x00,
};
  char lightword3[] ={/*--  文字:  强  --*/
/*--  宋体18;  此字体下对应的点阵为：宽x高=24x24   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x9F,0xF8,0x7F,0xDC,0x38,0x01,0x9C,0x38,0x01,
0x9C,0x38,0x01,0x9F,0xF8,0x31,0x9D,0xB8,0x3F,0x81,0xC0,0x39,0x81,0x80,0x38,0x01,
0x88,0x38,0x3F,0xFE,0x39,0xB9,0x9C,0x7F,0xF9,0x9C,0x33,0xB9,0x9C,0x03,0xBF,0xFC,
0x03,0xB9,0x9C,0x03,0xB1,0xB0,0x03,0x81,0x9C,0x03,0x01,0x8E,0x37,0x1F,0xFE,0x1F,
0xFF,0xC6,0x0E,0x70,0x06,0x00,0x00,0x00,};
  char lightword4[]={/*--  文字:  度  --*/
/*--  宋体18;  此字体下对应的点阵为：宽x高=24x24   --*/
0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x1C,0x00,0x18,0x0E,0x1C,0x1F,0xFF,0xFE,0x1C,
0x61,0x80,0x1C,0x71,0xE0,0x1C,0x71,0xD8,0x1F,0xFF,0xFC,0x1C,0x71,0xC0,0x1C,0x71,
0xC0,0x1C,0x7F,0xC0,0x1C,0x71,0xC0,0x1C,0x00,0x60,0x19,0xFF,0xF0,0x18,0x60,0xE0,
0x38,0x31,0xC0,0x38,0x1B,0x80,0x30,0x1F,0x00,0x30,0x1F,0x00,0x60,0x7F,0xF0,0x61,
0xE1,0xFE,0xDF,0x00,0x3C,0x00,0x00,0x00,};

  char lightword5[]={/*--  文字:  ：  --*/
/*--  宋体18;  此字体下对应的点阵为：宽x高=24x24   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x1E,0x00,0x00,0x3E,0x00,0x00,0x1E,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x00,0x00,0x3E,0x00,0x00,0x1E,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};


    char *lightword[]={lightword1,lightword2,lightword3,lightword4,lightword5};


    char start1[]={/*--  文字:  男  --*/
/*--  宋体42;  此字体下对应的点阵为：宽x高=56x56   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x38,0x00,0x00,0x1F,0xFF,0xFF,
0xFF,0xFC,0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xFE,0x00,0x00,0x1F,0x00,0x3C,0x00,0x7C,
0x00,0x00,0x1F,0x00,0x3C,0x00,0x7C,0x00,0x00,0x1F,0x00,0x3C,0x00,0x7C,0x00,0x00,
0x1F,0x00,0x3C,0x00,0x7C,0x00,0x00,0x1F,0x00,0x3C,0x00,0x7C,0x00,0x00,0x1F,0x00,
0x3C,0x00,0x7C,0x00,0x00,0x1F,0x00,0x3C,0x00,0x7C,0x00,0x00,0x1F,0xFF,0xFF,0xFF,
0xFC,0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xFC,0x00,0x00,0x1F,0x00,0x3C,0x00,0x7C,0x00,
0x00,0x1F,0x00,0x3C,0x00,0x7C,0x00,0x00,0x1F,0x00,0x3C,0x00,0x7C,0x00,0x00,0x1F,
0x00,0x3C,0x00,0x7C,0x00,0x00,0x1F,0x00,0x3C,0x00,0x7C,0x00,0x00,0x1F,0x00,0x3C,
0x00,0x7C,0x00,0x00,0x1F,0x00,0x3C,0x00,0x7C,0x00,0x00,0x1F,0x00,0x3C,0x00,0x7C,
0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xFC,0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xFC,0x00,0x00,
0x1F,0x00,0x38,0x00,0x7C,0x00,0x00,0x1F,0x00,0x3C,0x00,0x7C,0x00,0x00,0x1E,0x00,
0x3F,0x00,0x60,0x00,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x00,
0x00,0x00,0x00,0x00,0x00,0x7C,0x00,0x02,0x00,0x00,0x00,0x00,0x7C,0x00,0x07,0x00,
0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0xC0,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xC0,0x00,0xF0,
0x00,0x7C,0x00,0x0F,0x80,0x00,0x00,0x00,0x78,0x00,0x0F,0x80,0x00,0x00,0x00,0xF8,
0x00,0x0F,0x00,0x00,0x00,0x00,0xF8,0x00,0x0F,0x00,0x00,0x00,0x00,0xF0,0x00,0x1F,
0x00,0x00,0x00,0x01,0xF0,0x00,0x1F,0x00,0x00,0x00,0x03,0xE0,0x00,0x1F,0x00,0x00,
0x00,0x03,0xE0,0x00,0x1E,0x00,0x00,0x00,0x07,0xC0,0x00,0x1E,0x00,0x00,0x00,0x0F,
0x80,0x00,0x3E,0x00,0x00,0x00,0x1F,0x80,0x00,0x3E,0x00,0x00,0x00,0x3F,0x00,0x00,
0x3C,0x00,0x00,0x00,0x7E,0x03,0xE0,0x7C,0x00,0x00,0x01,0xF8,0x01,0xFF,0xFC,0x00,
0x00,0x07,0xF0,0x00,0x3F,0xF8,0x00,0x00,0x1F,0xC0,0x00,0x1F,0xF8,0x00,0x00,0x7F,
0x00,0x00,0x0F,0xF0,0x00,0x03,0xF8,0x00,0x00,0x07,0xC0,0x00,0x0F,0x80,0x00,0x00,
0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
    char start2[]={
/*--  文字:  明  --*/
/*--  宋体42;  此字体下对应的点阵为：宽x高=56x56   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,
0x00,0x07,0x00,0x00,0x00,0x00,0x07,0xFF,0xFF,0x80,0x00,0x00,0x00,0x07,0xFF,0xFF,
0xC0,0x00,0x00,0x00,0x07,0x80,0x07,0xC0,0x01,0xC0,0x0E,0x07,0x80,0x07,0x80,0x01,
0xFF,0xFF,0x07,0x80,0x07,0x80,0x01,0xFF,0xFF,0x87,0x80,0x07,0x80,0x01,0xE0,0x1F,
0x07,0x80,0x07,0x80,0x01,0xE0,0x1F,0x07,0x80,0x07,0x80,0x01,0xE0,0x1F,0x07,0x80,
0x07,0x80,0x01,0xE0,0x1F,0x07,0x80,0x07,0x80,0x01,0xE0,0x1F,0x07,0x80,0x07,0x80,
0x01,0xE0,0x1F,0x07,0x80,0x07,0x80,0x01,0xE0,0x1F,0x07,0x80,0x07,0x80,0x01,0xE0,
0x1F,0x07,0xFF,0xFF,0x80,0x01,0xE0,0x1F,0x07,0xFF,0xFF,0x80,0x01,0xE0,0x1F,0x07,
0x80,0x07,0x80,0x01,0xFF,0xFF,0x07,0x80,0x07,0x80,0x01,0xFF,0xFF,0x07,0x80,0x07,
0x80,0x01,0xE0,0x1F,0x07,0x80,0x07,0x80,0x01,0xE0,0x1F,0x07,0x80,0x07,0x80,0x01,
0xE0,0x1F,0x07,0x80,0x07,0x80,0x01,0xE0,0x1F,0x07,0x80,0x07,0x80,0x01,0xE0,0x1F,
0x07,0x80,0x07,0x80,0x01,0xE0,0x1F,0x07,0x80,0x07,0x80,0x01,0xE0,0x1F,0x07,0x80,
0x07,0x80,0x01,0xE0,0x1F,0x07,0x80,0x07,0x80,0x01,0xE0,0x1F,0x07,0xFF,0xFF,0x80,
0x01,0xE0,0x1F,0x0F,0xFF,0xFF,0x80,0x01,0xFF,0xFF,0x0F,0x80,0x07,0x80,0x01,0xFF,
0xFF,0x0F,0x80,0x07,0x80,0x01,0xE0,0x1F,0x0F,0x80,0x07,0x80,0x01,0xE0,0x1F,0x0F,
0x80,0x07,0x80,0x01,0xE0,0x1F,0x0F,0x00,0x07,0x80,0x01,0xE0,0x1C,0x1F,0x00,0x07,
0x80,0x01,0xE0,0x00,0x1F,0x00,0x07,0x80,0x01,0x80,0x00,0x1E,0x00,0x07,0x80,0x00,
0x00,0x00,0x3E,0x00,0x07,0x80,0x00,0x00,0x00,0x7C,0x00,0x07,0x80,0x00,0x00,0x00,
0x7C,0x00,0x07,0x80,0x00,0x00,0x00,0xF8,0x00,0x07,0x80,0x00,0x00,0x01,0xF0,0x00,
0x07,0x80,0x00,0x00,0x03,0xE0,0x00,0x07,0x80,0x00,0x00,0x07,0xC0,0x1C,0x0F,0x80,
0x00,0x00,0x0F,0x80,0x1F,0xFF,0x80,0x00,0x00,0x1F,0x00,0x07,0xFF,0x80,0x00,0x00,
0x3C,0x00,0x00,0xFF,0x00,0x00,0x00,0x78,0x00,0x00,0x7E,0x00,0x00,0x01,0xE0,0x00,
0x00,0x3C,0x00,0x00,0x03,0xC0,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,







};
  char start3[]={/*--  文字:  星  --*/
/*--  宋体42;  此字体下对应的点阵为：宽x高=56x56   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x70,0x00,0x00,0x1F,0xFF,0xFF,
0xFF,0xF8,0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xFC,0x00,0x00,0x1F,0x00,0x00,0x00,0xFC,
0x00,0x00,0x1F,0x00,0x00,0x00,0xF8,0x00,0x00,0x1F,0x00,0x00,0x00,0xF8,0x00,0x00,
0x1F,0x00,0x00,0x00,0xF8,0x00,0x00,0x1F,0x00,0x00,0x00,0xF8,0x00,0x00,0x1F,0x00,
0x00,0x00,0xF8,0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xF8,0x00,0x00,0x1F,0xFF,0xFF,0xFF,
0xF8,0x00,0x00,0x1F,0x00,0x00,0x00,0xF8,0x00,0x00,0x1F,0x00,0x00,0x00,0xF8,0x00,
0x00,0x1F,0x00,0x00,0x00,0xF8,0x00,0x00,0x1F,0x00,0x00,0x00,0xF8,0x00,0x00,0x1F,
0x00,0x00,0x00,0xF8,0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xF8,0x00,0x00,0x1F,0xFF,0xFF,
0xFF,0xF8,0x00,0x00,0x1F,0x00,0x00,0x00,0xF8,0x00,0x00,0x1F,0x00,0x30,0x00,0xF0,
0x00,0x00,0x1E,0x00,0x3E,0x00,0xC0,0x00,0x00,0x07,0x00,0x3F,0x00,0x00,0x00,0x00,
0x0F,0xC0,0x3E,0x00,0x00,0x00,0x00,0x0F,0xC0,0x3C,0x00,0x18,0x00,0x00,0x0F,0x80,
0x3C,0x00,0x3C,0x00,0x00,0x1F,0x00,0x3C,0x00,0x7E,0x00,0x00,0x1F,0xFF,0xFF,0xFF,
0xFF,0x00,0x00,0x3F,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x3C,0x00,0x3C,0x00,0x00,0x00,
0x00,0x7C,0x00,0x3C,0x00,0x00,0x00,0x00,0x78,0x00,0x3C,0x00,0x00,0x00,0x00,0xF0,
0x00,0x3C,0x00,0x00,0x00,0x00,0xF0,0x00,0x3C,0x00,0xC0,0x00,0x01,0xE0,0x00,0x3C,
0x01,0xE0,0x00,0x03,0xC0,0x00,0x3C,0x03,0xF0,0x00,0x07,0x9F,0xFF,0xFF,0xFF,0xF8,
0x00,0x07,0x0F,0xFF,0xFF,0xFF,0xFC,0x00,0x0E,0x06,0x00,0x3C,0x00,0x00,0x00,0x0C,
0x00,0x00,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,
0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x00,
0x01,0x80,0x00,0x00,0x00,0x3C,0x00,0x03,0xC0,0x00,0x00,0x00,0x3C,0x00,0x07,0xE0,
0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xF0,0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,0x0F,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};

  char start4[]={/*--  文字:  登  --*/
/*--  宋体42;  此字体下对应的点阵为：宽x高=56x56   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0xC6,
0x00,0xE0,0x00,0x00,0x00,0x01,0xE7,0x01,0xF0,0x00,0x00,0xFF,0xFF,0xF7,0x03,0xF8,
0x00,0x00,0xFF,0xFF,0xFB,0x03,0xF0,0x00,0x00,0x78,0x03,0xF3,0x87,0xC0,0x00,0x00,
0x00,0x03,0xE3,0x9F,0x00,0x00,0x00,0xC0,0x07,0xC1,0xFE,0x07,0x00,0x00,0xF0,0x07,
0xC1,0xF8,0x07,0x80,0x00,0x7C,0x0F,0x81,0xE0,0x0F,0xC0,0x00,0x3E,0x1F,0x00,0xE0,
0x1F,0xC0,0x00,0x1F,0x1F,0x00,0xF0,0x3F,0x00,0x00,0x1F,0xBE,0x00,0x78,0x7C,0x00,
0x00,0x0F,0xFC,0x00,0x3C,0xF8,0x00,0x00,0x0F,0x78,0x00,0x3F,0xE0,0x00,0x00,0x07,
0xF0,0x00,0xDF,0x80,0x00,0x00,0x01,0xF0,0x01,0xEF,0x80,0x00,0x00,0x03,0xFF,0xFF,
0xF7,0xE0,0x00,0x00,0x07,0xDF,0xFF,0xFB,0xF8,0x00,0x00,0x0F,0x8F,0x00,0x01,0xFE,
0x00,0x00,0x1F,0x00,0x00,0x00,0xFF,0xC0,0x00,0x3E,0x00,0x00,0x00,0x7F,0xFC,0x00,
0x78,0x00,0x00,0x01,0x1F,0xFC,0x01,0xF3,0x00,0x00,0x03,0x87,0xE0,0x03,0xC3,0xFF,
0xFF,0xFF,0xC1,0xC0,0x0F,0x83,0xFF,0xFF,0xFF,0xE0,0x00,0x1E,0x03,0xC0,0x00,0x07,
0xC0,0x00,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,
0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0x00,0x03,
0xC0,0x00,0x07,0x80,0x00,0x00,0x03,0xC0,0x00,0x07,0xC0,0x00,0x00,0x03,0xFF,0xFF,
0xFF,0xC0,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xC0,0x00,0x00,0x03,0xC0,0x00,0x07,0xC0,
0x00,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0x00,0x03,0x00,0x00,0x1C,0x00,0x00,0x00,
0x00,0xF0,0x00,0x3F,0x00,0x00,0x00,0x00,0x7C,0x00,0x3F,0x80,0x00,0x00,0x00,0x3E,
0x00,0x3E,0x00,0x00,0x00,0x00,0x3F,0x00,0x7C,0x00,0x00,0x00,0x00,0x1F,0x00,0x78,
0x00,0x00,0x00,0x00,0x1F,0x80,0xF0,0x00,0x00,0x00,0x00,0x0F,0x00,0xE0,0x01,0xC0,
0x00,0x00,0x0F,0x01,0xE0,0x03,0xE0,0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xF0,0x1F,0xFF,
0xFF,0xFF,0xFF,0xFF,0xF8,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
  char start5[]={/*--  文字:  场  --*/
/*--  宋体42;  此字体下对应的点阵为：宽x高=56x56   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x00,0x00,
0x00,0x60,0x00,0x00,0x1F,0x80,0x00,0x00,0xF0,0x00,0x00,0x1F,0x87,0xFF,0xFF,0xF8,
0x00,0x00,0x1F,0x03,0xFF,0xFF,0xFC,0x00,0x00,0x1E,0x01,0xC0,0x01,0xF8,0x00,0x00,
0x1E,0x00,0x00,0x03,0xE0,0x00,0x00,0x1E,0x00,0x00,0x07,0xC0,0x00,0x00,0x1E,0x00,
0x00,0x1F,0x80,0x00,0x00,0x1E,0x00,0x00,0x3F,0x00,0x00,0x00,0x1E,0x00,0x00,0x7E,
0x00,0x00,0x00,0x1E,0x00,0x00,0xFC,0x00,0x00,0x00,0x1E,0x00,0x01,0xF8,0x00,0x00,
0x00,0x1E,0x18,0x03,0xF0,0x00,0x00,0x00,0x1E,0x3C,0x07,0xE0,0x00,0x00,0x3F,0xFF,
0xFE,0x0F,0xC0,0x00,0x00,0x3F,0xFF,0xFF,0x1F,0x00,0x00,0x00,0x1F,0x1E,0x00,0x3E,
0x00,0x00,0x00,0x00,0x1E,0x00,0xFC,0x00,0x00,0xC0,0x00,0x1E,0x01,0xF8,0x00,0x01,
0xE0,0x00,0x1E,0x07,0xFF,0xFF,0xFF,0xF0,0x00,0x1E,0x03,0xFF,0xFF,0xFF,0xF8,0x00,
0x1E,0x01,0xC3,0xE1,0xF1,0xF0,0x00,0x1E,0x00,0x03,0xE3,0xE1,0xE0,0x00,0x1E,0x00,
0x03,0xC3,0xE1,0xE0,0x00,0x1E,0x00,0x07,0xC3,0xE3,0xE0,0x00,0x1E,0x00,0x07,0xC7,
0xC3,0xE0,0x00,0x1E,0x00,0x0F,0x87,0xC3,0xE0,0x00,0x1E,0x00,0x0F,0x87,0xC3,0xE0,
0x00,0x1E,0x00,0x1F,0x0F,0x83,0xE0,0x00,0x1E,0x03,0x9F,0x0F,0x83,0xE0,0x00,0x1E,
0x0F,0xBE,0x0F,0x83,0xE0,0x00,0x1E,0x3E,0x3C,0x1F,0x03,0xE0,0x00,0x1E,0xF8,0x7C,
0x3F,0x03,0xE0,0x00,0x1F,0xE0,0xF8,0x3E,0x03,0xC0,0x00,0x1F,0xC1,0xF0,0x7C,0x03,
0xC0,0x00,0xFF,0x03,0xE0,0x7C,0x03,0xC0,0x03,0xFC,0x07,0xC0,0xF8,0x07,0xC0,0x1F,
0xF8,0x0F,0x81,0xF0,0x07,0xC0,0x7F,0xE0,0x1E,0x03,0xE0,0x07,0xC0,0x3F,0xC0,0x7C,
0x07,0xC0,0x07,0xC0,0x1F,0x00,0xF0,0x0F,0x80,0x07,0xC0,0x0E,0x00,0x00,0x1F,0x00,
0x0F,0x80,0x00,0x00,0x00,0x7E,0x00,0x0F,0x80,0x00,0x00,0x00,0xF8,0x3F,0xDF,0x80,
0x00,0x00,0x03,0xF0,0x0F,0xFF,0x00,0x00,0x00,0x07,0xC0,0x03,0xFF,0x00,0x00,0x00,
0x1F,0x00,0x01,0xFE,0x00,0x00,0x00,0x7C,0x00,0x00,0xFC,0x00,0x00,0x00,0x60,0x00,
0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
char* start[]={start1,start2,start3,start4,start5};
char fmq1[]={/*--  文字:  蜂  --*/
/*--  宋体12;  此字体下对应的点阵为：宽x高=16x16   --*/
0x10,0x40,0x10,0x40,0x10,0xFC,0x7C,0x88,0x55,0x50,0x54,0x20,0x54,0xD8,0x57,0x26,
0x7C,0xF8,0x50,0x20,0x10,0xF8,0x14,0x20,0x1F,0xFE,0xE4,0x20,0x40,0x20,0x00,0x20,



};
char fmq2[]={/*--  文字:  鸣  --*/
/*--  宋体12;  此字体下对应的点阵为：宽x高=16x16   --*/
0x00,0x20,0x00,0x40,0x79,0xFC,0x49,0x04,0x49,0x44,0x49,0x24,0x49,0x24,0x49,0x0C,
0x49,0x00,0x49,0xFE,0x78,0x02,0x48,0x02,0x03,0xFA,0x00,0x02,0x00,0x14,0x00,0x08,
};
char fmq3[]={/*--  文字:  器  --*/
/*--  宋体12;  此字体下对应的点阵为：宽x高=16x16   --*/
0x00,0x00,0x3E,0x7C,0x22,0x44,0x22,0x44,0x3E,0x7C,0x01,0x20,0x01,0x10,0xFF,0xFE,
0x02,0x80,0x0C,0x60,0x30,0x18,0xC0,0x06,0x3E,0x7C,0x22,0x44,0x22,0x44,0x3E,0x7C,};
char *fmq[]={fmq1,fmq2,fmq3};






char cbmp1[]={/*--  文字:  换  --*/
/*--  宋体12;  此字体下对应的点阵为：宽x高=16x16   --*/
0x10,0x80,0x10,0x80,0x10,0xF8,0x11,0x08,0xFA,0x10,0x15,0xFC,0x11,0x24,0x19,0x24,
0x31,0x24,0xD1,0x24,0x17,0xFE,0x10,0x50,0x10,0x50,0x10,0x88,0x51,0x04,0x26,0x02,



};
char cbmp2[]={/*--  文字:  背  --*/
/*--  宋体12;  此字体下对应的点阵为：宽x高=16x16   --*/
0x04,0x80,0x04,0x98,0x7C,0xE0,0x04,0x84,0x1C,0x84,0xE4,0x7C,0x40,0x00,0x1F,0xF0,
0x10,0x10,0x1F,0xF0,0x10,0x10,0x1F,0xF0,0x10,0x10,0x10,0x10,0x10,0x50,0x10,0x20,

};
char cbmp3[]={/*--  文字:  景  --*/
/*--  宋体12;  此字体下对应的点阵为：宽x高=16x16   --*/
0x1F,0xF0,0x10,0x10,0x1F,0xF0,0x10,0x10,0x1F,0xF0,0x01,0x00,0xFF,0xFE,0x00,0x00,
0x1F,0xF0,0x10,0x10,0x10,0x10,0x1F,0xF0,0x01,0x00,0x21,0x08,0x45,0x04,0x02,0x00,

};
char *cbmp[]={cbmp1,cbmp2,cbmp3};


char ledd1[]={/*--  文字:  流  --*/
/*--  宋体12;  此字体下对应的点阵为：宽x高=16x16   --*/
0x00,0x80,0x20,0x40,0x17,0xFE,0x10,0x80,0x81,0x10,0x42,0x08,0x47,0xFC,0x10,0x04,
0x10,0x00,0x22,0x48,0xE2,0x48,0x22,0x48,0x22,0x48,0x22,0x4A,0x24,0x4A,0x08,0x46,


};
char ledd2[]={/*--  文字:  水  --*/
/*--  宋体12;  此字体下对应的点阵为：宽x高=16x16   --*/
0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x08,0x01,0x08,0x7D,0x90,0x05,0xA0,0x09,0x40,
0x09,0x40,0x11,0x20,0x11,0x10,0x21,0x08,0x41,0x06,0x81,0x00,0x05,0x00,0x02,0x00,

};
char ledd3[]={/*--  文字:  灯  --*/
/*--  宋体12;  此字体下对应的点阵为：宽x高=16x16   --*/
0x10,0x00,0x10,0x00,0x13,0xFE,0x10,0x20,0x54,0x20,0x58,0x20,0x50,0x20,0x90,0x20,
0x10,0x20,0x10,0x20,0x10,0x20,0x28,0x20,0x24,0x20,0x44,0x20,0x40,0xA0,0x80,0x40,
};
char *ledd[]={ledd1,ledd2,ledd3};



/*
    display_bmp:在开发板起始位置(x,y)显示BMP图片
    @bmp_path：显示图片的路径
    @x：起始显示的x坐标
    @y：起始显示的y坐标
*/
int display_bmp(char *bmp_path, int x, int y)
{
    //1.打开图片
    int bmp_fd = open(bmp_path, O_RDONLY);
    if (bmp_fd == -1)
    {
        printf("open %s error\n", bmp_path);
        return -1;
    }
    //判断是否为BMP格式
    unsigned char buf[4];   //存放读取出来的数据
    if (read(bmp_fd, buf, 2) != 2)
    {
        printf("read BMP signature failed\n");
        close(bmp_fd);
        return -1;
    }
    if (buf[0] != 0x42 || buf[1] != 0x4D)
    {
        printf("NOT bmp\n");
        close(bmp_fd);
        return -2;
    }
    //2.解析图片的宽、高、色深
    int width, height, depth;
    lseek(bmp_fd, 0x12, SEEK_SET);
    if (read(bmp_fd, buf, 4) != 4)
    {
        printf("read width failed\n");
        close(bmp_fd);
        return -1;
    }
    width = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0]; //宽度

    lseek(bmp_fd, 0x16, SEEK_SET);
    if (read(bmp_fd, buf, 4) != 4)
    {
        printf("read height failed\n");
        close(bmp_fd);
        return -1;
    }
    height = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0]; //高度

    lseek(bmp_fd, 0x1c, SEEK_SET);
    if (read(bmp_fd, buf, 2) != 2)
    {
        printf("read depth failed\n");
        close(bmp_fd);
        return -1;
    }
    depth = (buf[1] << 8) | buf[0]; //色深
    if (!(depth == 24 || depth == 32))
    {
        printf("unsupported depth: %d\n", depth);
        close(bmp_fd);
        return -3;
    }
    //3.利用宽、高、色深计算整个像素数组的大小
    int line_effctive_bytes = 0;    //一行有效字节数
    int laizi = 0;                  //填充字节数
    int line_total_bytes = 0;       //一行总的字节数
    int total_bytes = 0;            //整个像素数组的字节数
    
    line_effctive_bytes = abs(width) * (depth / 8);    
    if (line_effctive_bytes % 4 != 0)
    {
        laizi = 4 - line_effctive_bytes % 4;
    }
    line_total_bytes = line_effctive_bytes + laizi;
    total_bytes = line_total_bytes * abs(height);

    //4.动态分配内存存储像素数据（避免栈溢出）
    unsigned char *pixel_arr = malloc(total_bytes);
    if (!pixel_arr)
    {
        printf("memory allocation failed\n");
        close(bmp_fd);
        return -1;
    }
    
    lseek(bmp_fd, 54, SEEK_SET);
    if (read(bmp_fd, pixel_arr, total_bytes) != total_bytes)
    {
        printf("read pixel data failed\n");
        free(pixel_arr);
        close(bmp_fd);
        return -1;
    }

    //5.解读读取出来的数据，然后得到一个一个的像素点进行显示
    int a, r, g, b;
    int color;      //保存一个像素点的颜色值
    int i = 0;      //遍历图像数组的下标

    for (int y0 = 0; y0 < abs(height); y0++)
    {
        for (int x0 = 0; x0 < abs(width); x0++)
        {
            b = (unsigned char)pixel_arr[i++];  // 确保正确处理无符号值
            g = (unsigned char)pixel_arr[i++];
            r = (unsigned char)pixel_arr[i++];
            if (depth == 32)
            {
                a = (unsigned char)pixel_arr[i++];
            }
            else
            {
                a = 0;
            }
            color = (a << 24) | (r << 16) | (g << 8) | b;
            //将得到的颜色值显示到开发版对应的位置
            display_point(width > 0 ? x + x0 : x + abs(width) - 1 - x0,
                          height > 0 ? y + abs(height) - 1 - y0 : y + y0,
                          color);
        }
        i += laizi;  //跳过填充字节
    }
    
    //6.释放资源
    free(pixel_arr);
    close(bmp_fd);
    return 0;
}



/*
    LCD_draw_word:在屏幕上显示一个字符
    @x：字符显示的起始横坐标
    @y：字符显示的起始纵坐标
    @w：字符的宽
    @h：字符的高
    @data：保存字符取模信息的数组
    @color：字符显示的颜色
*/
void LCD_draw_word(int x,int y,int w,int h,char *data,int color)
{
    //遍历data数组里面的每一位，判断该位是0还是1，如果该位是1，应该显示这个像素点
    for(int i = 0; i < w/8*h; i++)  //遍历数组里面的每一个元素，以字节为单位
    {
        for(int j = 7; j >= 0; j--) //遍历每个字节中每一位
        {
            //把该位为1的像素点进行显示颜色，判断该位是否为1
            /*
                data[i] >> j & 1 结果非0 证明该位为1
                eg：
                    0001 0000 >> 1 & 1
                    0000 1000   & 
                    0000 0001

                    0001 0000 > 4 & 1
                    0000 0001 &
                    0000 0001
            */
            if(data[i] >> j & 1)
            {
                int x0 = x + i % (w/8)*8 + (7-j);
                int y0 = y + i / (w/8);

                //显示该像素点
                display_point(x0,y0,color);
            }
        }
    }
}
/*
    LCD_draw_num:在屏幕上显示一个四位数数据
    @x：字符显示的起始横坐标
    @y：字符显示的起始纵坐标
    @w：字符的宽
    @h：字符的高
    @num：数据
*/
void LCD_draw_num(int x,int y,int w,int h,int num)
{
    LCD_draw_word(x,y,w,h,dat[num/1000%10],0xff);
    LCD_draw_word(x+w,y,w,h,dat[num/100%10],0xff);
    LCD_draw_word(x+w*2,y,w,h,dat[num/10%10],0xff);
    LCD_draw_word(x+w*3,y,w,h,dat[num%10],0xff);
}

void LCD_draw_lightword(int x,int y,int w,int h,int color)
{
    LCD_draw_word(x,y,w,h,lightword[0],color);
    LCD_draw_word(x+w,y,w,h,lightword[1],color);
    LCD_draw_word(x+w*2,y,w,h,lightword[2],color);
    LCD_draw_word(x+w*3,y,w,h,lightword[3],color);
    LCD_draw_word(x+w*4,y,w,h,lightword[4],color);
}
void LCD_draw_start(int x,int y,int w,int h,int color)
{
    LCD_draw_word(x,y,w,h,start[0],color);
    LCD_draw_word(x+w,y,w,h,start[1],color);
    LCD_draw_word(x+w*2,y,w,h,start[2],color);
    LCD_draw_word(x+w*3,y,w,h,start[3],color);
    LCD_draw_word(x+w*4,y,w,h,start[4],color);
}

void LCD_draw_fmq(int x,int y,int w,int h,int color)
{
    LCD_draw_word(x,y,w,h,fmq[0],color);
    LCD_draw_word(x+w,y,w,h,fmq[1],color);
    LCD_draw_word(x+w*2,y,w,h,fmq[2],color);
}
void LCD_draw_cbmp(int x,int y,int w,int h,int color)
{
    LCD_draw_word(x,y,w,h,cbmp[0],color);
    LCD_draw_word(x+w,y,w,h,cbmp[1],color);
    LCD_draw_word(x+w*2,y,w,h,cbmp[2],color);
}
void LCD_draw_led(int x,int y,int w,int h,int color)
{
    LCD_draw_word(x,y,w,h,ledd[0],color);
    LCD_draw_word(x+w,y,w,h,ledd[1],color);
    LCD_draw_word(x+w*2,y,w,h,ledd[2],color);
}